import { Module } from '@nestjs/common';
import { AuthModule } from './auth/auth.module';
import { UsersModule } from './users/users.module';
import { RoleModule } from './role/role.module';
import { UploadController } from './upload/upload.controller';
import { UploadService } from './upload/upload.service';
import { UploadModule } from './upload/upload.module';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { PrismaService } from './prisma/prisma.service';
import { CategoryModule } from './category/category.module';
import { LinkModule } from './link/link.module';
import { HomeModule } from './home/home.module';
@Module({
  imports: [
    ServeStaticModule.forRoot({
      rootPath: join(__dirname, '..', 'public'), // 静态文件目录
    }),
    AuthModule,
    UsersModule,
    RoleModule,
    UploadModule,
    CategoryModule,
    LinkModule,
    HomeModule,
  ],
  controllers: [UploadController],
  providers: [UploadService, PrismaService], // 确保所有需要的模块都导入
})
export class AppModule {}
